import Vue from "vue";
import VueRouter from "vue-router";
// import Home from '../views/Home.vue'

Vue.use(VueRouter);

const routes = [
  // 主页面
  {
    path: '/',
    name: 'Home',
    redirect:'/Index',
    component: () => import('@/views/msmk/Home/Home'),
    children: [
      // 首页
      {
        path: "/",
        redirect: "Index",
      },
      {
        path: "/Index",
        name: "Index",
        component: () => import("@/views/msmk/Index/Index"),
      },
      // 课程
      {
        path: "/Courses",
        name: "Courses",
        component: () => import("@/views/msmk/Courses/Courses"),
      },
      // 课程
      {
        path: "/Courses",
        name: "Courses",
        component: () => import("@/views/msmk/Courses/Courses"),
      },

      // 约课记录
      {
        path: "/Rcords",
        name: "Rcords",
        component: () => import("@/views/msmk/Rcords/Rcords"),
      },
      {
        path:'/oto',
        name:'oto',
        component:()=>import('@/views/msmk/Rcords/oto')
      },
      {
        path:'/Rarticulars',
        name:'Rarticulars',
        component:()=>import('@/views/msmk/Rcords/Rarticulars')
      },
      // 练习
      {
        path: "/Practice",
        name: "Practice",
        component: () => import("@/views/msmk/Practice/Practice"),
      },
      // 我的页面
      {
        path: "/Myhome",
        name: "Myhome",
        component: () => import("@/views/msmk/Myhome/Myhome"),
      },
    ],
  },
  // 课程详情
  {
    path: "/detail/:id&:courseType",
    name: "detail",
    component: () => import("@/views/msmk/Courses/detail"),
  },
  // login
  {
    path: "/Login",
    name: "Login",
    component: () => import("@/views/msmk/Login/Login"),
  },
  //考点专练
  {
    path: "/practices",
    name: "practices",
    component: () => import("@/views/msmk/Practice/list/practices"),
  },
  {
    path: "/point",
    name: "point",
    component: () => import("@/views/msmk/Practice/list/point"),
  },
  //套卷练习
  {
    path:'/PaperPackage',
    name:'PaperPackage',
    component: () => import('@/views/msmk/Practice/list/PaperPackage'),
  },
  //搜索渲染页面
  {
    path:'/points',
    name:'points',
    component: () => import('@/views/msmk/Practice/list/points'),
  },
    //套卷练习
  {
    path: "/PaperPackage",
    name: "PaperPackage",
    component: () => import("@/views/msmk/Practice/list/PaperPackage"),
  },
  //仿真模考
  {
    path:'/Exam',
    name:'Exam',
    component: () => import("@/views/msmk/Practice/list/Exam"),
  },
  //仿真模考搜索
  {
    path:'/search',
    name:'search',
    component: () => import("@/views/msmk/Practice/list/search"),
  },
    //错题练习
  {
    path: '/ErrorQues',
    name:'ErrorQues',
    component: () => import("@/views/msmk/Practice/list/ErrorQues"),
  },
    //测评记录
  {
    path: '/ceping',
    name:'ceping',
    component: () => import("@/views/msmk/Practice/list/ceping"),
  },
    //习题收藏
  {
    path: '/shoucang',
    name:'shoucang',
    component: () => import("@/views/msmk/Practice/list/shoucang"),
  },
  // 我的学习
  {
    path: "/MyStudy",
    name: "MyStudy",
    component: () => import("@/views/msmk/Myhome/MyStudy"),
    meta: {
      title: "我的学习",
    },
  },
  // 余额
  {
    path: "/Remaining",
    name: "Remaining",
    component: () => import("@/views/msmk/Myhome/Remaining"),
    meta: {
      title: "我的余额",
    },
  },
  // 设置  退出登录
  {
    path: "/MyOut",
    name: "MyOut",
    component: () => import("@/views/msmk/Myhome/MyOut"),
    meta: {
      title: "设置",
    },
  },

];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});


export default router;
